package com.zhonghan.recharge.dao;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.zhonghan.recharge.pojo.ZhBusinessGascardOrder;
public interface ZhBusinessGascardOrderDao{
	/**
	 * 获得ZhBusinessGascardOrder数据的总行数
	 * @return
	 */
    long getZhBusinessGascardOrderRowCount();
	/**
	 * 获得ZhBusinessGascardOrder数据集合
	 * @return
	 */
    List<ZhBusinessGascardOrder> selectZhBusinessGascardOrder();
	/**
	 * 获得一个ZhBusinessGascardOrder对象,以参数ZhBusinessGascardOrder对象中不为空的属性作为条件进行查询
	 * @param obj
	 * @return
	 */
    List<ZhBusinessGascardOrder> selectZhBusinessGascardOrderByObj(ZhBusinessGascardOrder obj);
	/**
	 * 通过ZhBusinessGascardOrder的id获得ZhBusinessGascardOrder对象
	 * @param id
	 * @return
	 */
    ZhBusinessGascardOrder selectZhBusinessGascardOrderById(Integer id);
	/**
	 * 插入ZhBusinessGascardOrder到数据库,包括null值
	 * @param value
	 * @return
	 */
    int insertZhBusinessGascardOrder(ZhBusinessGascardOrder value);
	/**
	 * 插入ZhBusinessGascardOrder中属性值不为null的数据到数据库
	 * @param value
	 * @return
	 */
    int insertNonEmptyZhBusinessGascardOrder(ZhBusinessGascardOrder value);
	/**
	 * 批量插入ZhBusinessGascardOrder到数据库,包括null值
	 * @param value
	 * @return
	 */
    int insertZhBusinessGascardOrderByBatch(List<ZhBusinessGascardOrder> value);
	/**
	 * 通过ZhBusinessGascardOrder的id删除ZhBusinessGascardOrder
	 * @param id
	 * @return
	 */
    int deleteZhBusinessGascardOrderById(Integer id);
	/**
	 * 通过ZhBusinessGascardOrder的id更新ZhBusinessGascardOrder中的数据,包括null值
	 * @param enti
	 * @return
	 */
    int updateZhBusinessGascardOrderById(ZhBusinessGascardOrder enti);
	/**
	 * 通过ZhBusinessGascardOrder的id更新ZhBusinessGascardOrder中属性不为null的数据
	 * @param enti
	 * @return
	 */
    int updateNonEmptyZhBusinessGascardOrderById(ZhBusinessGascardOrder enti);
    
    /**
     * 修改订单状态
     */
    int updateRechargeStateByOrderNo(@Param("orderNo") String orderNo,@Param("rechargeState") String rechargeState,@Param("operateTime") String operateTime,@Param("bmBillId") String billId);
    /**
     * 斑马回调  更新订单
     * @param orderNo
     * @param rechargeState
     */
    int updateRechargeStateByOrderNoByCallBack(@Param("orderNo") String orderNo,@Param("rechargeState") String rechargeState,@Param("operateTime") String operateTime);
    
    
    int updateRechargeStateByOrderNoAndBmBillId(@Param("orderNo") String orderNo,@Param("rechargeState") String rechargeState,@Param("operateTime") String operateTime,@Param("bmBillId") String billId);
    /**
     * 查询订单
     * @param order
     * @return
     */
    List<ZhBusinessGascardOrder> selectZhGascardOrderByCondition(ZhBusinessGascardOrder order);
    
    /**
     * 查询订单详情
     * @param orderNo
     * @return
     */
    ZhBusinessGascardOrder selectZhBusinessGascardOrderByOrderNo(@Param("orderNo") String orderNo);
    /**
     * 查询今日订单量
     * @param order
     * @return
     */
	long getZhBusinessGascardOrderRowCountByObj(ZhBusinessGascardOrder order);
	/**
	 * 查询今日销售额
	 * @param order
	 * @return
	 */
	Long selectBusinessSaleAmountByObj(ZhBusinessGascardOrder order);
}